﻿using System;


namespace FireBus.Contracts
{
	[Serializable]
	public class ExtensionToken : ValueObject<ExtensionName>
	{
		private readonly ExtensionPath _Path;

		private readonly TypeName _TypeName;


		public ExtensionName Name
		{
			get { return Value; }
		}

		public ExtensionPath Path
		{
			get { return _Path; }
		}

		public TypeName TypeName
		{
			get { return _TypeName; }
		}


		public ExtensionToken(
			ExtensionName name,
			ExtensionPath path,
			TypeName typeName)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}
			if (path == null)
			{
				throw new ArgumentNullException("path");
			}
			if (typeName == null)
			{
				throw new ArgumentNullException("typeName");
			}

			Value = name;
			_Path = path;
			_TypeName = typeName;
		}
	}
}
